<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array(
	'id'=>'educator-certificates-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="help-block">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<?php echo $form->textFieldRow($model,'cellphone',array('class'=>'span5','maxlength'=>11)); ?>

	<?php echo CHtml::link ( '发送验证码', array ('/educators/educatorCertificates/sendCellphone' ) ,array('class'=>'btn btn-info sendCellphone'));?>
	
	<div class="form-actions">
		<?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'submit',
			'type'=>'primary',
			'label'=>'绑定',
		)); ?>
	</div>

<?php $this->endWidget(); ?>



<script type="text/javascript">
/*<![CDATA[*/
jQuery(function($) {
	jQuery('body').on('click','.sendCellphone',function(){
			var _cellphone = $("#EducatorCertificates_cellphone").val();
			var _data = {'cellphone':_cellphone};
			jQuery.ajax({'success':function(){},'data':_data,'type':'POST','url':'/educators/educatorCertificates/sendCellphone','cache':false});
			return false;
		} 
	);
});
/*]]>*/
</script>